package com.katze.boot.common.converter;

import cn.idev.excel.converters.string.StringStringConverter;
import cn.idev.excel.metadata.GlobalConfiguration;
import cn.idev.excel.metadata.data.WriteCellData;
import cn.idev.excel.metadata.property.ExcelContentProperty;

public class JobStatus extends StringStringConverter {

    @Override
    public WriteCellData<?> convertToExcelData(String value, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) {
        return switch (value) {
            case "0" -> new WriteCellData<>("暂停");
            case "1" -> new WriteCellData<>("运行");
            default -> new WriteCellData<>("未知");
        };
    }
}
